/**
 * @(#)ApkSimulator.java 2016年11月10日
 * Copyright(C) 2016 ZHEXIN IT CO.,LTD. All rights reserved.
 */
package org.jsbd.boss.domian.channel;

import java.io.Serializable;

import org.apache.commons.lang.StringUtils;

import com.alibaba.fastjson.JSONObject;

/**
 * apk和模拟器版本对应关系
 * 
 * @author <a href="mailto:xupengcheng@zhexinit.com" >徐鹏程</a>
 * @version 1.0.0
 */
public class ApkSimulator implements Serializable {
	private static final long serialVersionUID = -9154394691695373283L;
	private String mark;
	private String sysVer;// 系统版本
	private String isDelete;
	private Integer dayLimit;
	private Integer reserveLeftCount;
	private Double count;

	public Integer getReserveLeftCount() {
		return reserveLeftCount;
	}

	public void setReserveLeftCount(Integer reserveLeftCount) {
		this.reserveLeftCount = reserveLeftCount;
	}

	public String getMark() {
		return mark;
	}

	public void setMark(String mark) {
		this.mark = mark;
	}

	public String getSysVer() {
		return sysVer;
	}

	public void setSysVer(String sysVer) {
		this.sysVer = sysVer;
	}

	public String getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(String isDelete) {
		this.isDelete = isDelete;
	}

	public Integer getDayLimit() {
		return dayLimit;
	}

	public void setDayLimit(Integer dayLimit) {
		this.dayLimit = dayLimit;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public Double getCount() {
		return count;
	}

	public void setCount(Double count) {
		this.count = count;
	}

	public boolean isUseful() {
		if (dayLimit != null && dayLimit > 0 && StringUtils.isNotBlank(isDelete) && "0".equals(isDelete) || (reserveLeftCount != null && reserveLeftCount > 0)) {
			return true;
		} else {
			return false;
		}
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return JSONObject.toJSONString(this);
	}

}
